<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:fragment="common_head()">
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="icon" th:href="@{/assets/images/favicon.ico}" type="image/x-icon"/>
	<link rel="stylesheet" href="../public/assets/libs/layer/skin/default/layui.css" th:href="@{/assets/libs/layer/skin/default/layui.css}" />
	<link rel="stylesheet" href="../public/assets/css/main.css" th:href="@{/assets/css/main.css}" />
	<link rel="stylesheet" href="../public/assets/libs/iconfont/iconfont.css" th:href="@{/assets/libs/iconfont/iconfont.css}" />
	<link rel="stylesheet" th:href="@{/assets/libs/pace-0.5.6/themes/pace-theme-flash.css}" />
	<link rel="stylesheet" th:href="@{/assets/libs/select2/css/select2.min.css}" />
	<script th:src="@{/assets/libs/pace-0.5.6/pace.min.js}"></script>
	<script th:src="@{/assets/libs/jquery/1.8.1/jquery.min.js}"></script>
	<script src="../public/assets/libs/layer/layer.js" th:src="@{/assets/libs/layer/layer.js}"></script>
	<script type="text/javascript" th:src="@{/assets/libs/My97DatePicker/WdatePicker.js}"></script>
	<script src="../public/assets/js/main.js" th:src="@{/assets/js/main.js}"></script>
	<script src="../public/assets/libs/select2/js/select2.min.js" th:src="@{/assets/libs/select2/js/select2.min.js}"></script>
	<script type="text/javascript" th:if="${msg!=null}" th:inline="javascript">
            layer.msg([[${msg}]], {time:3000});
	</script>
	</th:block>
</head>
<body>
	<th:block th:fragment="common_body(content)" th:with="principal=${#request.userPrincipal.principal}">
	<!--页面顶部-->
  	<div class="header">
  		<div class="container">
  			<a class="header-logo" href="/admin"><img th:src="@{/assets/images/logo.png}" /></a>
  			<div class="header-info">
  				<span th:text="'Welcome '+${#strings.isEmpty(principal.name)?principal.username:principal.name}">hello，song</span>&emsp;<a style="color:#3381ff" href="#" th:href="@{/logout}">LOGOUT</a>
  			</div>
  		</div>
  	</div>
  	
  	<div class="container">
		<div class="main">
  			<div class="main-left" th:with="menus=${@menuService.allMenus}">
<th:block th:each="topMenu:${menus.?[parentId == null]}" 
	th:with="menuNodes=${menus.?[parentId==#root.topMenu.id AND #root.principal.permissions.contains(permissionId)]}">
	<dl class="main-left-menu" th:if="${menuNodes?.size() gt 0}">
		<dt>
			<i th:class="'iconfont icon-'+${topMenu.icon}"></i>
			<a href="#" class="disabled" th:text="${topMenu.name}"></a>
		</dt>
		<dd th:each="childrenMenu : ${menuNodes}">
			<a th:href="@{${childrenMenu.url}}" th:text="${childrenMenu.name}" th:class="${childrenMenu.url eq entrance?'selected':''}"></a>
		</dd>
	</dl>
</th:block>
  				<div class="main-left-footer"></div>
  			</div>
  			<div class="main-right" th:replace="${content}">
  				<!--内容底部-->
				<div th:fragment="pagination(page)" th:object="${page}">
					<input type="hidden" name="page" th:value="*{pageNum}" />
					<div class="line10"></div>
					<div class="pagelist">
					    <!-- <div class="l-btns">
					        <span>显示[[*{pageSize}]]条/页</span>
					    </div> -->
					    <div class="default">
					        <span>共[[*{total}]]条记录</span>
					        <!-- <span id="prevPage" th:class="*{pageNum == 0}?disabled">«previous</span> -->
					        <span id="prevPage" onclick="$.pageListPrevPage()" th:class="*{pageNum == 0}?disabled">«上一页</span>
					        <a th:remove="*{pageNum lt 5}?all">1</a>
					        <span th:remove="*{pageNum lt 6}?all">...</span>
					        <a th:text="*{pageNum}-3" th:remove="*{pageNum lt 4}?all"></a>
					        <a th:text="*{pageNum}-2" th:remove="*{pageNum lt 3}?all"></a>
					        <a th:text="*{pageNum}-1" th:remove="*{pageNum lt 2}?all"></a>
					        <a th:text="*{pageNum}" th:remove="*{pageNum lt 1}?all"></a>
					        <span class="current" th:text="*{pageNum+1}">1</span>
					        <a th:text="*{pageNum}+2" th:remove="*{pageNum+2 gt ((total-1)/pageSize+1)}?all"></a>
						    <a th:text="*{pageNum}+3" th:remove="*{pageNum+3 gt ((total-1)/pageSize+1)}?all"></a>
						    <a th:text="*{pageNum}+4" th:remove="*{pageNum+4 gt ((total-1)/pageSize+1)}?all"></a>
						    <span th:remove="*{pageNum+6 gt ((total-1)/pageSize+1)}?all">...</span>
						    <a th:text="*{(total-1)/pageSize+1}" th:remove="*{pageNum+5 gt ((total-1)/pageSize+1)}?all"></a>
					        <span id="nextPage" onclick="$.pageListNextPage()" th:class="*{pageNum==((total-1)/pageSize)}?disabled">下一页»</span>
					        <!-- <span id="nextPage" th:class="*{pageNum==((total-1)/pageSize)}?disabled">next»</span>
					         -->
					    </div>
					</div>
				</div>
  			</div>
  		</div>
	</div>
	<script th:fragment="script" type="text/javascript" th:inline="javascript">
		//layer相册组件
		layer.photos({
			photos : '.layer-photos',
			anim : 5
		});
	</script>
	<div class="footer">
		<ul>
			<li>Copyright © 2020 TFE Group Corporation Ltd. All Rights Reserved.</li>
		</ul>
	</div>
	</th:block>
</body>
</html>